Couldn't you just store the strings reversed?
We can only determine the best way to speed up your program if you specify the entire thing. For instance if there's a reasonable fixed number of strings they could be tokenized, each represented by an integer.
The problem with comparing from the end is that you need to find the end first, which means scanning both strings to find their ends (at least of the shortest one).
Code:
#include <stdbool.h>
#include <stdio.h>
// returns true if equal, false if not equal
bool revcmp(const char *a, const char *b) {
const char *astart = a;
while (*a++ & *b++) ; // & to avoid short-circuiting
while (a > astart && *--a == *--b) ;
return *a == *b;
}
int main() {
printf("%d\n", revcmp("12345", "123"));
printf("%d\n", revcmp("123", "12345"));
printf("%d\n", revcmp("12345", "21345"));
printf("%d\n", revcmp("12345", "92345"));
printf("%d\n", revcmp("12345", "12345"));
return 0;
}